﻿@using QH.JobBack.Model;;
@{
    var menus = ViewBag.menuList as List<MenuInfo>;
    var function = Model as Function;
}
<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>修改功能 - QAdmin后台模板</title>
    <link rel="stylesheet" href="~/static/common/layui/css/layui.css">
    <link rel="stylesheet" href="~/static/admin/css/style.css">
    <script src="~/static/common/layui/layui.js"></script>
    <script src="~/static/common/jquery-3.3.1.min.js"></script>
    <script src="~/static/common/vue.min.js"></script>
</head>
<body>
    <div id="app">
        

        <div class="main" id="app">
            
            <!--右侧-->
            <div class="">
                <fieldset class="layui-elem-field layui-field-title">
                    <legend>修改功能</legend>
                </fieldset>
                <form class="layui-form " action="/Menu/Add" method="post">
                    
                    <div class="layui-form-item">
                        <label class="layui-form-label">所属菜单</label>
                        <div class="layui-input-inline">
                            <select name="MenuId" id="caiDan" lay-verify="required" disabled>
                                @foreach (var item in menus)
                                {
                                    if (@item.MenuId == @function.MenuId)
                                    {
                                        <option value=@item.MenuId selected>@item.MenuName</option>
                                    }
                                    else
                                    {
                                        <option value=@item.MenuId>@item.MenuName</option>
                                    }
                                }
                            </select>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">菜单名称</label>
                        <div class="layui-input-block">
                            <input type="hidden" value="@function.Id" name="Id" required lay-verify="required" placeholder="" autocomplete="off" class="layui-input">
                            <input type="text" value="@function.NAME" name="Name" required lay-verify="required" placeholder="" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">控制器名称</label>
                        <div class="layui-input-block">
                            <input type="text" value="@function.ControllerName" name="ControllerName" required lay-verify="required" placeholder="" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">方法名称</label>
                        <div class="layui-input-block">
                            <input type="text" value="@function.ActionName" name="ActionName" required lay-verify="required" placeholder="" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">功能编码</label>
                        <div class="layui-input-block">
                            <input type="text" value="@function.FunctionCode" name="FunctionCode" required lay-verify="required" placeholder="" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">备注</label>
                        <div class="layui-input-block">
                            <input type="text" value="@function.Remark" name="Remark" required lay-verify="required" placeholder="" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <button class="layui-btn" lay-submit lay-filter="submit">立即提交</button>
                        </div>
                    </div>
                </form>

            </div>
        </div>
    </div>
    <script src="~/static/function/update.js"></script>
</body>
</html>
